<%-- 
    Document   : kpResult
    Created on : Oct 1, 2013, 2:57:46 AM
    Author     : Thai Ha Cong
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="description" content="Bidding Strategy - Knapsack Problem">
        <title>Bidding Strategy - Knapsack Problem</title>
        <link href="<%= request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/adMenu.css" rel="stylesheet" type="text/css"/>
        <s:head />
    </head>
    <body>
        <div class="headerbg">
            <%@include file="/include/mHeader.jsp" %>
        </div>
        <div class="contentbg">
            <div class="content">
                <div class="adMenu">
                    <%@include file="/include/mMenu.jsp" %>
                </div>
                <div class="kpResult">
                    <h1>Multiple-choice Online Knapsack Problem Algorithm</h1>
                    <div class="kpAlgorithm">
                        <s:actionmessage />
                        <s:actionerror />

                        <s:form action="kpResult" namespace="/Administration/Bidding" method="post" enctype="multipart/form-data">
                            <s:textfield name="product.idProduct" label="Product ID" size="24" readonly="true" disabled="false" value="%{product.idProduct}"/>
                            <s:textfield name="product.code" label="Product Code" size="24" readonly="true" disabled="false" value="%{product.code}"/>
                            <s:textfield name="product.name" label="Product Name" size="24" readonly="true" disabled="false" value="%{product.name}"/>
                            
                            <s:textfield name="revenue" label="Revenue of each Item" size="24" cssStyle="" value="%{getText('{0,number,#,##0.00}',{revenue})}"/>
                            <s:textfield name="conversionRate" label="Estimated Conversion Rate" size="24"/>
                            <s:textfield name="revenuePerClick" label="Revenue per Click" size="24" readonly="true" disabled="true" value="%{getText('{0,number,#,##0.00}',{revenuePerClick})}"/>
                            <s:textfield name="budget" label="Total Budget" size="24" cssStyle=""/>
                            <s:textfield name="spentBudget" label="Spent Budget" size="24" cssStyle=""/>
                            <s:textfield name="bmin" label="Minimum Bid Price" size="24" cssStyle=""/>
                            <table>
                                <tr>
                                    <td><s:submit value="Solve" cssStyle="width: 72px; margin-left: 190px;" theme="simple"/></td>
                                </tr>
                            </table>
                        </s:form>

                        <p style="font-size: 20px;">
                            <b>Recommended bid price: </b>
                            <span style="color: red; font-weight: bold">
                                <s:text name="format.money">
                                    <s:param value="output"/>
                                </s:text>
                            </span>
                        </p>
                        
                        <br>
                        <s:url namespace="/Administration/Bidding" action="kpAlgorithm" var="kpAlgorithmUrl"></s:url>
                        <s:a href="%{kpAlgorithmUrl}" title="Change Product">Change Product</s:a>
                    </div>
                </div>
            </div>
        </div>
        <div class="footerbg">
            <%@include file="/include/iFooter.jsp" %>
        </div>
    </body>
</html>


